function login(){
	var params={};
	params.uid=document.getElementById('uname').value;
	params.password=document.getElementById('password').value;
	if(document.getElementById('uname').value==''){
		sAlert('请输入用户名！');
		return;
	}
	if(document.getElementById('password').value==''){
		sAlert('请输入密码！');
		return;
	}
	var service = new Service("LoginService.login",params,"json");
 	service.doExtAjaxService(function(){
 		if(service.getCode()=="2000"){
		    rtnObject_datagrid = service.getResponse();
		    if(rtnObject_datagrid.user){
		    	//sAlert('登陆失败','ERROR');
				location.href=getLocation()+'/index.jsp';
				return;
			}
		}else{
		  	rtnObject_datagrid="";
		  	alert(1);
			sAlert('登陆失败','ERROR');
			return;
		}
 	},false);
}